import request from "@/api/request"
import type { AxiosResponse } from "axios"

// get
export type GetRankingParams = {
  rank_type: string | number | undefined
}
export function getRanking(params: GetRankingParams):Promise<AxiosResponse>{
  return request('rank/query_rank_reward_config', params, 'post')
}

// create or update
export type SetRankingParams = {
  rank_type: string | number,
  gear_id?: number,
  rank_reward: string
}
export function setRanking(params: SetRankingParams):Promise<AxiosResponse>{
  return request('rank/set_rank_reward_config', params, 'post')
}